# Copyright 2019 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
load("//build_tools/bazel:iree_lit_test.bzl", "iree_lit_test_suite")

package(
    features = ["layering_check"],
    licenses = ["notice"],  # Apache 2.0
)

iree_lit_test_suite(
    name = "lit",
    srcs = enforce_glob(
        [
            "annotate_dispatches.mlir",
            "canonicalize.mlir",
            "capture_dispatch_dynamic_dims.mlir",
            "capture_scf_for_dynamic_dims.mlir",
            "cleanup_tensor_shapes.mlir",
            "deduplicate_executables.mlir",
            "export_benchmark_funcs.mlir",
            "initialize_empty_tensors.mlir",
            "inject_dispatch_tracing.mlir",
            "inject_tensor_tracing.mlir",
            "insert_dispatch_debug_targets.mlir",
            "outline_constants.mlir",
            "outline_dispatch_externs.mlir",
            "outline_dispatch_regions.mlir",
            "pipeline_tests.mlir",
            "replicate_globals_per_affinity.mlir",
            "top_level_scf_to_cfg.mlir",
            "verify_input_ir.mlir",
        ],
        include = ["*.mlir"],
    ),
    cfg = "//compiler:lit.cfg.py",
    tools = [
        "//tools:iree-opt",
        "@llvm-project//llvm:FileCheck",
    ],
)
